-- GENERATED SPELL FOR [Nexus Lord] --


function spell0_30245(pUnit, Event) --@Arcane Shock,n/a--
pUnit:FullCastSpellOnTarget(57058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30245', 582, 1)
end

function spell1_30245(pUnit, Event) --@Arcane Shock,n/a--
pUnit:FullCastSpellOnTarget(60073,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30245', 562, 1)
end

function spell2_30245(pUnit, Event) --@Haste,Self--
pUnit:FullCastSpellOnTarget(57060,pUnit)
pUnit:RegisterEvent('Sorts_30245', 15307, 1)
end

function Sorts_30245(pUnit, Event)
local choix_sorts_30245 = math.random(0, 2)
if choix_sorts_30245 == 0 then
pUnit:RegisterEvent('spell0_30245', 1, 1)
end
if choix_sorts_30245 == 1 then
pUnit:RegisterEvent('spell1_30245', 1, 1)
end
if choix_sorts_30245 == 2 then
pUnit:RegisterEvent('spell2_30245', 1, 1)
end
end

function mob30245_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30245', math.random(1500, 3000), 1)
end

function mob30245_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30245_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30245_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30245, 1, 'mob30245_Action')
RegisterUnitEvent(30245, 2, 'mob30245_Leave')
RegisterUnitEvent(30245, 3, 'mob30245_Kill')
RegisterUnitEvent(30245, 4, 'mob30245_Die')
